#ifndef GEODESY_H
#define GEODESY_H
#include "GeodPoint.h"

class GeodeSys
{
public:
	// Hard numbers from the WGS84 standard.
	static const double EQURAD;
	static const double iFLATTENING;
	static const double SQUASH;
	static const double STRETCH;
	static const double POLRAD;

	/// Takes a geodetic coordinate data and returns the sea level radius.
	static double GeodPointToSeaLevelRadius(const GeodPoint& geod);

	// Geodetic course/distance computation
	static bool direct(const GeodPoint& p1,double course1,double distance,GeodPoint& p2,double& course2);

	/// overloaded version of above, returns new value directly, throws
	/// an sg_exception on failure.
	static GeodPoint direct(const GeodPoint& p1,double course1,double distance,bool* ok = nullptr);

	static bool inverse(const GeodPoint& p1,const GeodPoint& p2,double& course1,double& course2,double& distance);

	static double courseDeg(const GeodPoint& from,const GeodPoint& to,bool* ok = nullptr);
	static double distanceM(const GeodPoint& from,const GeodPoint& to,bool* ok = nullptr);
	static double distanceNm(const GeodPoint& from,const GeodPoint& to);
};

#endif 